import { Alert, Grid } from '@mui/material';
import { memo } from 'react';

/**
 * 错误提示组件
 */
const ErrorAlert = memo(({ error }: { error: string }) => (
    error ? (
        <Grid item xs={12}>
            <Alert severity="error">
                {error}
            </Alert>
        </Grid>
    ) : null
));

export default ErrorAlert;